<template>
	<view class="main">
		<button class="tui-btn-block tui-fillet" hover-class="tui-green-hover" @click="outLoginBtn('2')">
			<text class="ml24">跳过广告{{timeData}}</text>
		</button>
	</view>
</template>

<script>
	import tuiIcon from "@/components/icon/icon"

	export default {
		data() {
			return {
				timeData : 5
			}
		},
		components: {
			tuiIcon
		},
		computed:{
		},
		onShow() {
		},
		onLoad() {
			// #ifndef H5
			uni.showShareMenu({
				showShareItems : ['qq', 'qzone', 'wechatFriends', 'wechatMoment']	
			});
			// #endif
			
			let countdown = setInterval(() => {
				this.timeData--;
				if (this.timeData < 0) {
					clearInterval(countdown);
					uni.reLaunch({
						url: '/pages/index/index'
					});
				}
			}, 1000);
		},
		methods: {
            outLoginBtn(type){
				uni.reLaunch({
					url: '/pages/index/index'
				});                
            }
		}
	}
</script>

<style scoped lang="scss">
	@import '../../static/style/thorui.css';
	uni-page-body{
		height: 100%;
	}
	.main{
		height: 100%;
		background: url(//jihe2.oss-cn-beijing.aliyuncs.com/xinli/ad1.jpg);
		background-size: 100% 100%;
		position: relative;
		button{
			width: 35%;
			position: absolute;
			right: 36upx;
			top: 36upx;
			padding: 0 !important;
			background: rgba($color: #f8f8f8, $alpha: 0.6);
		}
	}
	.box{
		width: 300upx;
		height: 300upx;
		border-radius: 50%;
	}
	.ml24{
		margin-left: 20upx;
	}
</style>
